package com.kt.dion.golf.data;

import java.util.ArrayList;

public class UserListData extends Data
{

	private ArrayList arrUserList = new ArrayList();
	private User selectedUser;

	public void addUser(User user)
	{
		arrUserList.add(user);
	}

	public User getUser(int i)
	{
		if (i < arrUserList.size())
			return (User) arrUserList.get(i);
		else
			return null;
	}

	public int getDataSize()
	{
		return 3;
	}

	public User getSelectedUser()
	{
		return selectedUser;
	}
	
	public void removeSelectedUser()
	{
		arrUserList.remove(selectedUser);
	}

	public void setSelectedUser(User selectedUser)
	{
		this.selectedUser = selectedUser;
	}

	public class User
	{
		String id;

		public String getId()
		{
			return id;
		}

		public void setId(String id)
		{
			this.id = id;
		}
	}

	public void dispose(boolean isDisposeOfPage)
	{
		arrUserList.clear();
		arrUserList = null;
	}

	public String toString()
	{
		return null;
	}
}
